CREATE TABLE [dbo].[HistoryRecord]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[UserId] [int] NULL,
[Action] [varbinary] (max) NOT NULL,
[Description] [varbinary] (max) NOT NULL,
[DateCreated] [datetime] NOT NULL,
[Deleted] [bit] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
ALTER TABLE [dbo].[HistoryRecord] ADD
CONSTRAINT [FK_HistoryRecord_UserInfo] FOREIGN KEY ([UserId]) REFERENCES [dbo].[UserInfo] ([Id])
GO
ALTER TABLE [dbo].[HistoryRecord] ADD CONSTRAINT [PK_History] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
